package product

import (
	"time"
	"vue-admin-server/global"
)

type ReliabilityReport struct {
	global.GVA_MODEL
	ChipID        uint      `json:"chip_id" form:"chip_id" gorm:"index,comment:芯片ID，即chip_spec表主键"`
	TestTime      time.Time `json:"test_time" form:"test_time" gorm:"comment:测试时间（Test time）"`
	TestContent   string    `json:"test_content" form:"test_content" gorm:"comment:测试内容"`
	ModuleType    string    `json:"module_type" form:"module_type" gorm:"comment:器件验证类型(Module type)"`
	ReportFileURL string    `json:"report_file_url" form:"report_file_url" gorm:"comment:长期可靠性验证报告（Long Reliability report）"`
	// 测试结果
	// 工作条件（Operating Condition）
	RatedCurrent                   string `json:"rated_current" form:"rated_current" gorm:"comment:额定电流(Rated Current)I0"`
	RatedPower                     string `json:"rated_power" form:"rated_power" gorm:"comment:额定功率(Rated Power)P0"`
	RatedJunctionTemperature       string `json:"rated_junction_temperature" form:"rated_junction_temperature" gorm:"comment:额定结温(Rated junction temperature)Tjct，0【Tjct0】"`
	RatedJunctionTemperatureKelvin string `json:"rated_junction_temperature_kelvin" form:"rated_junction_temperature_kelvin" gorm:"comment:额定开尔文结温(Rated junction temperature Kelvin)Tjct，0(K)【TjctoK】"`
	// 加速条件（Acceleration Condition）
	BurnInCurrent                   string `json:"burn_in_current" form:"burn_in_current" gorm:"comment:老化电流(Burn-in current)I"`
	BurnInPower                     string `json:"burn_in_power" form:"burn_in_power" gorm:"comment:老化功率(Burn-in power)P"`
	BurnInJunctionTemperature       string `json:"burn_in_junction_temperature" form:"burn_in_junction_temperature" gorm:"comment:老化结温(Burn-in junction temperature)Tjct"`
	BurnInJunctionTemperatureKelvin string `json:"burn_in_junction_temperature_kelvin" form:"burn_in_junction_temperature_kelvin" gorm:"comment:老化开尔文结温(Burn-in junction temperature Kelvin)Tjct(K)【TjctK】"`
	// 常数项（Constant term）
	ActivationEnergy  string `json:"activation_energy" form:"activation_energy" gorm:"comment:活化能(activation energy)Ea/ev【Ea】"`
	XFactor           string `json:"x_factor" form:"x_factor" gorm:"comment:x因子(xFactor)【xFactor】"`
	YFactor           string `json:"y_factor" form:"y_factor" gorm:"comment:y因子(yFactor)【yFactor】"`
	BoltzmannConstant string `json:"boltzmann_constant" form:"boltzmann_constant" gorm:"comment:玻尔兹曼常数（eV/K）【Boltzmann constant】kB"`
	// 加速因子（AF）
	CurrentAccelerationFactor     string `json:"current_acceleration_factor" form:"current_acceleration_factor" gorm:"comment:电流加速(Current acceleration factor)【Iaf】"`
	PowerAccelerationFactor       string `json:"power_acceleration_factor" form:"power_acceleration_factor" gorm:"comment:功率加速(Power acceleration factor)【Paf】"`
	TemperatureAccelerationFactor string `json:"temperature_acceleration_factor" form:"temperature_acceleration_factor" gorm:"comment:温度加速(Temperature acceleration factor)【Taf】"`
	TotalAccelerationFactor       string `json:"total_acceleration_factor" form:"total_acceleration_factor" gorm:"comment:总加速因子(Total acceleration factor)AF"`
	// 卡方值（X2）
	ConfidenceCoefficient string `json:"confidence_coefficient" form:"confidence_coefficient" gorm:"comment:置信水平(confidence coefficient)（α）"`
	InvalidNumber         string `json:"invalid_number" form:"invalid_number" gorm:"comment:失效数(Invalid number)（r）"`
	ChiSquare             string `json:"chi_square" form:"chi_square" gorm:"comment:卡方(chi-square)X2"`
	// 工作寿命（Operating MTBF）
	TotalTestTime          string `json:"total_test_time" form:"total_test_time" gorm:"comment:累计工作时间（Total test time）"`
	FailureRate            string `json:"failure_rate" form:"failure_rate" gorm:"comment:失效率(failure rate)λ"`
	MeanTimeBetweenFailure string `json:"mean_time_between_failure" form:"mean_time_between_failure" gorm:"comment:寿命(Mean Time Between Failure)MTBF"`
	// 加速寿命（Acceleration MTBF）
	AccelerationFactor     string `json:"acceleration_factor" form:"acceleration_factor" gorm:"comment:加速因子(Acceleration factor)AF"`
	RatedFailureRate       string `json:"rated_failure_rate" form:"rated_failure_rate" gorm:"comment:失效率(Rated failure rate)FR0"`
	AcceleratedFailureRate string `json:"accelerated_failure_rate" form:"accelerated_failure_rate" gorm:"comment:失效率(Accelerated failure rate)FR"`
}
